package com.woniu.controller;

import com.woniu.entity.MyData;
import com.woniu.server.MyServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class MyController {
    @Autowired
    MyServer server;

    @RequestMapping("/all")
    List<MyData> getData(){
        List<MyData> data = server.getData();
        return data;
    }
}
